package com.wbk.lotterysystemsystemservice.controller.admin;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.github.pagehelper.PageInfo;

import com.wbk.user.feign.UserFeign;

import com.wbk.user.qo.UserBanQO;
import com.wbk.user.vo.UserExtVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import result.Result;

@Api
@RestController
@RequestMapping("/system/api/admin/user")
public class UserController {

    @Autowired
    UserFeign userFeign;

    @ApiOperation(value="封禁用户接口",notes = "封禁用户")
    @PostMapping("/userBan")
    public Result<String> userBan(@RequestBody UserBanQO userBanQO){
        if(userBanQO.getExpire()<1){
            return new Result<>(100,"封禁失败","封禁时间必须为整数且大于零");
        }
        return userFeign.userBan(userBanQO);
    }
}
